import 'package:json_annotation/json_annotation.dart';

part 'recipe_collect_detail_api.g.dart';

@JsonSerializable()
class ResponseRecipeCollectDetailApi {
  final int total;
  final List<RecipeInfo> rows;

  ResponseRecipeCollectDetailApi({required this.total, required this.rows});

  factory ResponseRecipeCollectDetailApi.fromJson(Map<String, dynamic> json) =>
      _$ResponseRecipeCollectDetailApiFromJson(json);

  Map<String, dynamic> toJson() => _$ResponseRecipeCollectDetailApiToJson(this);
}

@JsonSerializable()
class RecipeInfo {
  final String recipeId;
  final String moduleId;
  final String? recipeListInfoId;
  final String? name;
  final String? ossIds;
  final int? sort;
  final int? status;
  final String? ossUrls;

  RecipeInfo({
    required this.recipeId,
    required this.moduleId,
    required this.recipeListInfoId,
    required this.name,
    required this.ossIds,
    this.sort,
    this.status,
    this.ossUrls,
  });

  factory RecipeInfo.fromJson(Map<String, dynamic> json) =>
      _$RecipeInfoFromJson(json);

  Map<String, dynamic> toJson() => _$RecipeInfoToJson(this);
}
